<template>
  <tm-app>
    <tm-navbar title="购物清单" :followTheme="true" :hideHome="true">
    </tm-navbar>
    <!-- <tm-sheet :transprent="true" :padding="[20]" :margin="[0]">
      <tm-card
        :title="`什么是空码-${index}`"
        v-for="index in 10"
        :key="index"
        :shadow="0"
        :margin="[0, 0, 0, 20]"
      >
        <template v-slot:title>
          <view
            class="flex flex-row flex-row-center-between"
            style="width: 100%"
          >
            <tm-text>订单号: 0476378065384206336</tm-text>
            <tm-text>快递公司：中通</tm-text>
          </view>
        </template>
        <template v-slot:content>
          <tm-text _class="mb-n2"> 收货人：王洋 15690469182</tm-text>
          <tm-text _class="mb-n2">
            收货地址：北京市 北京市 朝阳区
            十八里店小羊坊西口康医口腔对面妈妈驿站
          </tm-text>
          <tm-text _class="mb-n2"> 商品描述：200张</tm-text>
          <tm-sheet
            :padding="[0]"
            :margin="[0]"
            _class="mb-n2 flex flex-row flex-row-center-start"
          >
            <tm-text>快递单号: 78666860865099</tm-text>
            <tm-icon
              name="tmicon-copy-fill"
              _class="ml-n4"
              @click="copyOrderNumber(index)"
              :followTheme="true"
            ></tm-icon>
          </tm-sheet>
          <tm-text _class="mb-n2">成交金额：50.00</tm-text>
          <tm-text> 支付时间: 2023-03-14 21:25:09</tm-text>
        </template>
      </tm-card>
    </tm-sheet> -->
    <tm-sheet _class="flex-center"> 暂无订单</tm-sheet>
    <tm-message ref="msg"></tm-message>
  </tm-app>
</template>

<script setup>
import { ref } from "vue";
const msg = ref(null);

const copyOrderNumber = (number) => {
  uni.setClipboardData({
    data: number,
    success: () => {
      msg.value.show({ model: "success", text: "复制成功" });
    },
    fail: () => {
      msg.value.show({ model: "error", text: "复制失败" });
    },
  });
};
</script>

<style scoped></style>
